package com.baosight.risk.mapper.system;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baosight.risk.base.mapper.BaseMapper;
import com.baosight.risk.service.system.entity.SysRole;

public interface SysRoleMapper extends BaseMapper<SysRole> {

    /**
     * 根据用户ID查询角色
     *
     * @param userId 用户ID
     * @return 角色列表
     */
    List<SysRole> selectRolesByUserId(@Param("userId") String userId);

    List<SysRole> checkRole(@Param("roleKey") String roleKey, @Param("roleName") String roleName);

    List<SysRole> selectRole(@Param("role") SysRole role);

    List<SysRole> selectRoleByCompId(@Param("compId") String compId);

    List<SysRole> selectRoleByCompIdAndUserId(@Param("compId") String compId, @Param("userId") String userId);

    List<SysRole> selectRoleByCompIdAndUserCode(@Param("compCodes") List<String> compCodes, @Param("userId") String userId);

    List<SysRole> selectRoleByIds(List ids);

    List<SysRole> queryRole();

    Integer delelteRoleByIds(@Param("ids") List<String> ids, @Param("status") String status);

}